package top.bug.blog.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import top.bug.blog.common.BasePO;

/**
 * @author <a href="https://github.com/jiusi66">九思.</a>
 * @email 10837907@qq.com
 * @from <a href="https://www.52bug.top">递归茶馆-www.52bug.top</a>
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_comments")
@ApiModel("评论信息实体")
public class Comments extends BasePO {
    @ApiModelProperty("文章id")
    @TableField("target_id")
    private String targetId;

    @ApiModelProperty("父级id")
    @TableField("parent_id")
    private String parentId;

    @ApiModelProperty("根评论ID，-1表示自身是根评论")
    @TableField("root_id")
    private String rootId;

    @ApiModelProperty("评论类型（1-文章 2-朋友圈）")
    @TableField("target_type")
    private String targetType;

    @ApiModelProperty("昵称")
    @TableField("nickname")
    private String nickname;

    @ApiModelProperty("被回复者昵称")
    @TableField("reply_to_nickname")
    private String replyToNickname;

    @ApiModelProperty("邮箱")
    @TableField("email")
    private String email;

    @ApiModelProperty("用户站点")
    @TableField("website")
    private String website;

    @ApiModelProperty("评论内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("评论者IP地址")
    @TableField("ip_address")
    private String ipAddress;

    @ApiModelProperty("IP所在地理位置")
    @TableField("ip_region")
    private String ipRegion;

    @ApiModelProperty("点赞数")
    @TableField("like_num")
    private Integer likeNum;

    @ApiModelProperty("回复数")
    @TableField("reply_num")
    private Long replyNum;

    @ApiModelProperty("状态: 0-待审核, 1-已发布, 2-垃圾评论")
    @TableField("status")
    private String status;

    @ApiModelProperty("是否是管理员评论: 0-否, 1-是")
    @TableField("is_admin")
    private String isAdmin;

    @ApiModelProperty("设备类型: pc/mobile/tablet")
    @TableField("device_type")
    private String deviceType;

    @ApiModelProperty("浏览器类型")
    @TableField("browser")
    private String browser;

    @ApiModelProperty("操作系统")
    @TableField("os")
    private String os;
}